package com.means.polymerize.assembly.listener;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import lombok.SneakyThrows;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.listener.adapter.MessageListenerAdapter;
import org.springframework.stereotype.Component;

/**
 * redis监听处理
 *
 * @author xuhaifeng
 * @since 2021.10.15
 */
@Component
public class RedisListenerHandler extends MessageListenerAdapter {
    @Override
    @SneakyThrows
    public void onMessage(Message message, byte[] pattern) {
        final JSONObject parseObject = JSON.parseObject(new String(message.getBody()));
    }
}
